-
-
Notifications
You must be signed in to change notification settings - Fork 291
Delay dataset layout copy to DCPL #5537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
@@ -3021,6 +3033,10 @@ H5D__check_filters(H5D_t *dataset) | |||
if (fill_status == H5D_FILL_VALUE_DEFAULT || fill_status == H5D_FILL_VALUE_USER_DEFINED) { | |||
if (fill->fill_time == H5D_FILL_TIME_ALLOC || | |||
(fill->fill_time == H5D_FILL_TIME_IFSET && fill_status == H5D_FILL_VALUE_USER_DEFINED)) { | |||
/* Flush layout to DCPL before reading */ | |||
if (H5D_flush_layout_to_dcpl(dataset) < 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does H5Z_can_apply require a valid layout? I wonder if we could pass the layout separately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not now that I think about it, though maybe we could hack it to work for internal filters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understand it, H5Z_can_apply()
eventually invokes filter-defined callbacks to determine whether the filter can be applied with the current DCPL/datatype/dataspace setup. The callback can access arbitrary fields on the DCPL including the layout, so we want the layout available there to reflect the dataset accurately.
I have significantly changed this piece of code (and related areas) in my incoming threadsafety patches. Would you consider backburnering this until those are in? |
Copying the layout immediately slows down workloads that open many small datasets.
The layout copy is delayed until either a user requests the dataset's DCPL, or until the start of an operation that may need to read the layout from the DCPL.
Whether the copying of the layout has been performed yet for a dataset is tracked by a new field on
H5D_shared_t
.dsets.c